package com.zhangzhan.gulimallcart.feign;

import com.zhangzhan.gulimallcommcon.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @author 张一恒
 * @version 1.0
 * @description:
 * @date 2024/6/29 6:48
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {

    @RequestMapping(value = "/gulimallproduct/skuinfo/info/{skuId}",method = RequestMethod.GET)
    //@RequiresPermissions("gulimallproduct:skuinfo:info")
    public R skuInfo(@PathVariable("skuId") Long skuId);

    @RequestMapping(value = "/gulimallproduct/skuinfo/attrs/{skuId}",method = RequestMethod.GET)
    //@RequiresPermissions("gulimallproduct:skuinfo:info")
    public R skuAttrs(@PathVariable("skuId") Long skuId);

    @RequestMapping(value = "/gulimallproduct/skuinfo/getPrice",method = RequestMethod.GET)
    public BigDecimal getPrice(@RequestParam("skuId") Long skuId);
}
